`fish.age` <-
function(data,ncol=c(1,2,3,4,5))
	{
        if (is.null(data)) stop("argument 'data' must be a matrix with at least 5 columns (year, zone, sex, age and lenght, in that order)")
        if (!is.null(data)) 
		{
		if (dim(data)[2] < 5) 
			{
			stop("Argument 'Data' must be a matrix with at least 5 columns (year, zone, sex, age and lenght, in that order)")
			}
		else  {
			agelength<- cbind(data[,ncol[1]],data[,ncol[2]],data[,ncol[3]],data[,ncol[4]],data[,ncol[5]])
			colnames(agelength) <- c("year","zone","sex","age","length")
			print(paste("Your colection data is (Year x age):"))
			print(table(agelength[,1],agelength[,4]))
			}
    		}
	length.data <- list(agelength=agelength,frec.TableYearSex=table(agelength[,1],
      			agelength[,4]),frec.TableYearZone=table(agelength[,1],agelength[,2]))
			print(paste("Your colection data is (Year x Zone):"))
			print(table(agelength[,1],agelength[,2]))

	return(length.data)	 
	}

